<!DOCTYPE html>
<html xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <title>商品分类表</title>
    <#include "/header.html">
    <link rel="stylesheet" href="${request.contextPath}/statics/css/bootstrap-table.min.css">
    <link rel="stylesheet" href="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.css">
    <script src="${request.contextPath}/statics/libs/bootstrap-table.min.js"></script>
    <script src="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.min.js"></script>
    <script src="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.bootstrap3.js"></script>
    <script src="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.extension.js"></script>
    <script src="${request.contextPath}/statics/plugins/treegrid/tree.table.js"></script>
    <!-- 文件上传 -->
    <link rel="stylesheet" href="${request.contextPath}/statics/plugins/oss/style.css">
    <script type="text/javascript" src="${request.contextPath}/statics/plugins/oss/js/plupload.full.min.js"></script>
    <script type="text/javascript" src="${request.contextPath}/statics/plugins/oss/ziyun_library.js"></script>
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <#if shiro.hasPermission("goodsCategory:goodscategory:save")>
                <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
            </#if>
            <#if shiro.hasPermission("goodsCategory:goodscategory:update")>
                <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
            </#if>
            <#if shiro.hasPermission("goodsCategory:goodscategory:delete")>
                <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
            </#if>
            <#if shiro.hasPermission("goodsCategory:goodscategory:hide")>
                <a class="btn btn-primary" @click="hide"><i class="fa fa-trash-o"></i>&nbsp;屏蔽</a>
            </#if>
        </div>
<!--<table id="jqGrid"></table>-->
<!--<div id="jqGridPager"></div>-->
        <table id="goodsCategoryTable" data-unique-id="categoryId" data-mobile-responsive="true" data-click-to-select="true">
            <thead><tr><th data-field="selectItem" data-checkbox="true"></th></tr></thead>
        </table>
    </div>
<!--新增start-->
<!--<div v-show="addForm" class="panel panel-default">-->
    <!--<div class="panel-heading">{{title}}</div>-->
    <!--<form class="form-horizontal" v-show="addForm">-->
        <!--<div class="form-group">-->
            <!--<div class="col-sm-2 control-label">添加分类名称</div>-->
            <!--<div class="col-sm-10">-->
                <!--<input type="text" class="form-control" v-model="goodsCategory.categoryName" placeholder="分类名称"/>-->
            <!--</div>-->
        <!--</div>-->
        <!--<div class="form-group">-->
            <!--<div class="col-sm-2 control-label">选择上一级</div>-->
            <!--<div class="col-sm-10">-->
                <!--<input type="text" class="form-control" v-model="goodsCategory.parentName" @click="goodsCategoryTree" readonly="true" placeholder="一级分类"/>-->
            <!--</div>-->
        <!--</div>-->
        <!--<div class="form-group" v-if="node.categoryLevel == 2">-->
            <!--<div class="col-sm-2 control-label">商品类型</div>-->
            <!--<div class="col-sm-10">-->
            <!--<select class="form-control input-sm" v-model="goodsCategory.goodsType">-->
                <!--<option v-for="item in goodsTypeEnum" :value="item.value">{{item.describe}}</option>-->
            <!--</select>-->
            <!--</div>-->
        <!--</div>-->
        <!--<div class="form-group" v-if="goodsCategory.goodsType == 'quote'">-->
            <!--<div class="col-sm-2 control-label">分类报价处理器</div>-->
            <!--<div class="col-sm-10">-->
                <!--<select class="form-control input-sm" v-model="goodsCategory.categoryHandleType">-->
                    <!--<option value="none">none</option>-->
                    <!--<option value="picture">picture</option>-->
                    <!--<option value="single">single</option>-->
                    <!--<option value="fold">fold</option>-->
                    <!--<option value="envelope">envelope</option>-->
                    <!--<option value="reticule">reticule</option>-->
                    <!--<option value="entire">entire</option>-->
                    <!--<option value="cup">cup</option>-->
                    <!--<option value="kupono">kupono</option>-->
                    <!--<option value="letter">letter</option>-->
                    <!--<option value="archives">archives</option>-->
                    <!--<option value="memo">memo</option>-->
                    <!--<option value="box">box</option>-->
                    <!--<option value="glue">glue</option>-->
                    <!--<option value="quickprint_picture">quickprint_picture</option>-->
                    <!--<option value="quickprint_single">quickprint_single</option>-->
                    <!--<option value="ad_materiel">ad_materiel</option>-->
                <!--</select>-->
            <!--</div>-->
        <!--</div>-->
        <!--<div class="form-group" v-if="node.categoryLevel == 2">-->
            <!--<div class="col-sm-2 control-label">是否有部件</div>-->
            <!--<div class="col-sm-10">-->
                <!--&lt;!&ndash;<select class="form-control input-sm" v-model="goodsCategory.assembly">&ndash;&gt;-->
                <!--&lt;!&ndash;</select>&ndash;&gt;-->
                <!--<el-switch-->
                        <!--style="display: block"-->
                        <!--v-model="goodsCategory.assembly"-->
                        <!--active-color="#87CEFF"-->
                        <!--inactive-color="#F2F2F2"-->
                        <!--active-text="有部件"-->
                        <!--inactive-text="无部件">-->
                <!--</el-switch>-->
            <!--</div>-->
        <!--</div>-->
        <!--<div class="form-group">-->
            <!--<div class="col-sm-2 control-label">是否屏蔽</div>-->
            <!--<div class="col-sm-10">-->
                <!--<select class="form-control input-sm" v-model="goodsCategory.disabled">-->
                    <!--<option value="true">是</option>-->
                    <!--<option value="false">否</option>-->
                <!--</select>-->
            <!--</div>-->
        <!--</div>-->
        <!--<div class="form-group">-->
            <!--<div class="col-sm-2 control-label">类型序号</div>-->
            <!--<div class="col-sm-10">-->
                <!--<input type="text" class="form-control" v-model="goodsCategory.typeId" placeholder="类型序号"/>-->
            <!--</div>-->
        <!--</div>-->
        <!--&lt;!&ndash;<div class="form-group">&ndash;&gt;-->
            <!--&lt;!&ndash;<div class="col-md-3 control-label">分类图片</div>&ndash;&gt;-->
            <!--&lt;!&ndash;<div class="col-md-3 control-label"></div>&ndash;&gt;-->
            <!--&lt;!&ndash;<div v-if="JSON.stringify(good.imageUrls) != '[]'">&ndash;&gt;-->
                    <!--&lt;!&ndash;<span style="margin-right: 10px;;margin-left: 10px;"  v-for="image in imageUrls">&ndash;&gt;-->
                        <!--&lt;!&ndash;<img v-bind:src="window.parent.vm.ossHost+image.filename" style="width:100px;text-align:left">&ndash;&gt;-->
                        <!--&lt;!&ndash;&lt;!&ndash;<span><input @click="delImage(image,image.fileId)" value="删除"/></span>&ndash;&gt;&ndash;&gt;-->
                    <!--&lt;!&ndash;</span>&ndash;&gt;-->

            <!--&lt;!&ndash;</div>&ndash;&gt;-->
        <!--&lt;!&ndash;</div>&ndash;&gt;-->
        <!--<div class="form-group">-->
            <!--<div class="col-md-3 control-label">分类图片</div>-->
            <!--<div class="col-md-5">-->
                <!--<div v-if="imgUrls != []" v-for="item of imgUrls" class="thumbnail" style="width: 190px;height: 110px">-->
                    <!--<img id="image1" :src="window.parent.vm.ossHost+item">-->
                <!--</div>-->
                <!--<div class="caption">-->
                    <!--<p>-->
                        <!--<a class="btn btn-sm" id="upload1">点击上传</a>-->
                        <!--<input type="hidden" v-model="goodsCategory.imgUrl">-->
                    <!--</p>-->
                <!--</div>-->
            <!--</div>-->
        <!--</div>-->
        <!--<div class="form-group">-->
            <!--<div class="col-sm-2 control-label"></div>-->
            <!--<input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>-->
            <!--&nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>-->
        <!--</div>-->
    <!--</form>-->
<!--</div>-->
<!--&lt;!&ndash;新增end&ndash;&gt;-->
<!--修改start-->
<div v-show="!showList" class="panel panel-default">
    <div class="panel-heading">{{title}}</div>
    <form class="form-horizontal" id="updateForm">
        <input type="hidden" v-model="goodsCategory.categoryId" name="categoryId">
        <div class="form-group">
            <div class="col-sm-3 control-label">父级分类: </div>
            <div class="col-sm-10">
                <input type="text" class="form-control input-sm" v-model="goodsCategory.parentName" @click="goodsCategoryTree" readonly placeholder="一级分类"/>
                <input type="hidden" v-model="goodsCategory.parentCategoryId" name="parentCategoryId"/>
            </div>
        </div>
        <!--<div class="form-group" v-show="showList">-->
        <!--<div class="col-sm-3 control-label">上级分类父级ID: </div>-->
        <!--<div class="col-sm-10">-->
        <!--<select v-model="goodsCategory.parentCategoryId" class="form-control input-sm" name="parentCategoryId">-->
        <!--<option v-for="item in goodsCategoryEntityList" :value="item.categoryId">{{item.categoryName}}</option>-->
        <!--</select>-->
        <!--</div>-->
        <!--</div>-->
        <div class="form-group">
            <div class="col-sm-3 control-label"><span style="color: red">*&nbsp;</span>分类名称: </div>
            <div class="col-sm-10">
                <input type="text" class="form-control input-sm" v-model="goodsCategory.categoryName" placeholder="分类名称" name="categoryName"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label"><span style="color: red;">*&nbsp;</span>分类展示平台:</div>
            <div class="col-sm-10">
                <!--<select v-model="goodsCategory.stageType" class="form-control">-->
                    <!--<option value="0">紫云网/pom平台</option>-->
                    <!--<option value="1">紫云网</option>-->
                    <!--<option value="2">pom平台</option>-->
                <!--</select>-->
                <select class="form-control input-sm" v-model="goodsCategory.stageType">
                    <option value=0>紫云网/pom平台</option>
                    <option value=1>紫云网</option>
                    <option value=2>pom平台</option>
                </select>
            </div>
        </div>
        <div class="form-group" >
            <div class="col-sm-2 control-label">商品类型</div>
            <div class="col-sm-10">
                <select class="form-control input-sm" v-model="goodsCategory.goodsType">
                    <option v-for="item in goodsTypeEnum" :value="item.value">{{item.describe}}</option>
                </select>
            </div>
        </div>
        <div class="form-group" v-if="goodsCategory.goodsType == 'material'">
            <div class="col-sm-2 control-label">广告物料计价方式</div>
            <div class="col-sm-10">
                <select class="form-control input-sm" v-model="goodsCategory.pricingManner">
                    <option value=0>按面积算</option>
                    <option value=1>按周长算</option>
                    <option value=2>按长度算</option>
                </select>
            </div>
        </div>
        <div class="form-group" >
            <div class="col-sm-2 control-label">是否自来纸</div>
            <div class="col-sm-10">
                <select class="form-control input-sm" v-model="goodsCategory.selfPaper">
                    <option :value=true>是自来纸</option>
                    <option :value=false>不是自来纸</option>
                </select>
            </div>
        </div>
        <div class="form-group" >
            <div class="col-sm-2 control-label">是否可上传文件</div>
            <div class="col-sm-10">
                <select class="form-control input-sm" v-model="goodsCategory.canUploadFile">
                    <option :value=true>可上传文件</option>
                    <option :value=false>不可上传文件</option>
                </select>
            </div>
        </div>
        <div class="form-group" >
            <div class="col-sm-2 control-label">分类排序</div>
            <div class="col-sm-10">
                <input type="number" class="form-control input-sm" v-model="goodsCategory.categoryOrder"/>
                <lable>(数值越大,排序越靠前)</lable>
            </div>
        </div>
        <!--<div class="form-group" v-if="goodsCategory.goodsType == 'quote'">-->
            <!--<div class="col-sm-2 control-label">是否有部件</div>-->
            <!--<div class="col-sm-10">-->
                <!--&lt;!&ndash;<select class="form-control input-sm" v-model="goodsCategory.assembly">&ndash;&gt;-->
                <!--&lt;!&ndash;</select>&ndash;&gt;-->
                <!--<el-switch-->
                        <!--style="display: block"-->
                        <!--v-model="goodsCategory.assembly"-->
                        <!--active-color="#87CEFF"-->
                        <!--inactive-color="#F2F2F2"-->
                        <!--active-text="有部件"-->
                        <!--inactive-text="无部件">-->
                <!--</el-switch>-->
            <!--</div>-->
        <!--</div>-->
        <div class="form-group" v-if="goodsCategory.goodsType == 'print' ||goodsCategory.goodsType == 'fast'">
            <div class="col-sm-2 control-label">分类报价处理器</div>
            <div class="col-sm-10">
                <select class="form-control input-sm" v-model="goodsCategory.categoryHandleType">
                    <option value="none">none</option>
                    <option value="picture">画册</option>
                    <option value="single">单页</option>
                    <option value="fold">折页</option>
                    <option value="envelope">信封</option>
                    <option value="reticule">手提袋</option>
                    <option value="entire">封套</option>
                    <option value="cup">纸杯</option>
                    <option value="kupono">复写联单</option>
                    <option value="letter">letter</option>
                    <option value="archives">档案袋</option>
                    <option value="memo">便签</option>
                    <option value="box">包装盒</option>
                    <option value="glue">不干胶</option>
                    <option value="quickprint_picture"> 快印画册</option>
                    <option value="quickprint_single">快印单张</option>
                    <option value="ad_materiel">广告物料</option>
                </select>
            </div>
        </div>
        <!--<div class="form-group">-->
            <!--<div class="col-sm-3 control-label">模板: </div>-->
            <!--<div class="col-sm-10">-->
                <!--<select v-model="goodsCategory.templateIds" class="form-control input-sm" name="templateIds">-->
                    <!--<option v-for="item in goodsTemplateList" :value="item.templateId">{{item.templateName}}</option>-->
                <!--</select>-->
            <!--</div>-->
        <!--</div>-->
        <!--<div class="form-group">-->
            <!--<div class="col-sm-3 control-label">是否叶子结点: </div>-->
            <!--<div class="col-sm-10">-->
                <!--<select class="form-control input-sm" v-model="goodsCategory.whetherLeaf" name="whetherLeaf">-->
                    <!--<option value="true">是</option>-->
                    <!--<option value="false">否</option>-->
                <!--</select>-->
            <!--</div>-->
        <!--</div>-->
        <div class="form-group">
            <div class="col-sm-3 control-label">是否删除: </div>
            <div class="col-sm-10">
                <!--<select class="form-control input-sm" v-model="goodsCategory.disabled" name="disabled">-->
                    <!--<option value="true">是</option>-->
                    <!--<option value="false">否</option>-->
                <!--</select>-->
                <el-switch style="display: block" v-model="goodsCategory.disabled"
                           active-color="#87CEFF" inactive-color="#F2F2F2"
                           active-text="删除" inactive-text="未删除">
                </el-switch>
            </div>
        </div>
        <!--<div class="form-group">-->
            <!--<div class="col-sm-3 control-label">类型序号: </div>-->
            <!--<div class="col-sm-10">-->
                <!--<input type="text" class="form-control input-sm" v-model="goodsCategory.typeId" placeholder="类型序号" name="typeId"/>-->
            <!--</div>-->
        <!--</div>-->
        <!--<div v-if="JSON.stringify(goodsCategoryRelation) != '{}'">-->
            <div class="form-group">
                <div class="col-sm-3 control-label">是否参与分享家分成: </div>
                <div class="col-sm-10">
                    <select class="form-control input-sm" v-model="goodsCategoryRelation.shareStatus" name="shareStatus">
                        <option value=0>关闭</option>
                        <option value=1>开启</option>
                        <option value=2>未设置</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-3 control-label">分享家分成比例: </div>
                <div class="col-sm-10">
                    <input type="text" class="form-control input-sm" v-model="goodsCategoryRelation.commission" placeholder="分享家分成比例" name="commission"/>
                </div>
            </div>
            <!--<div class="form-group">-->
                <!--<div class="col-sm-3 control-label">排序: </div>-->
                <!--<div class="col-sm-10">-->
                    <!--<input type="text" class="form-control input-sm"  placeholder="排序"/>-->
                <!--</div>-->
            <!--</div>-->
            <!--<div class="form-group">-->
                <!--<div class="col-sm-3 control-label">商品数: </div>-->
                <!--<div class="col-sm-10">-->
                    <!--<input type="text" class="form-control input-sm"  placeholder="商品数"/>-->
                <!--</div>-->
            <!--</div>-->
            <div class="form-group">
                <div class="col-sm-3 control-label">页面标题: </div>
                <div class="col-sm-10">
                    <input type="text" class="form-control input-sm" v-model="goodsCategoryRelation.seoTitle" placeholder="页面标题" name="seoTitle"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-3 control-label">页面关键词: </div>
                <div class="col-sm-10">
                    <input type="text" class="form-control input-sm" v-model="goodsCategoryRelation.seoMetaKeywords" placeholder="页面关键词" name="seoMetaKeywords"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-3 control-label">页面描述: </div>
                <div class="col-sm-10">
                    <textarea cols="80" rows="5" class="form-control" v-model="goodsCategoryRelation.seoMetaDescription" name="seoMetaDescription"></textarea>
                </div>
            </div>
        <!--</div>-->
        <div class="form-group">
            <div class="col-md-3 control-label">分类图片：</div>
            <div class="col-md-5">
                <!--<div class="thumbnail" v-if="imgUrlso != []" v-for="(item,index) of imgUrlso">-->
                    <!--<img :src="window.parent.vm.ossHost+item" id="imgage2" style="width: 190px;height: 110px">-->
                    <!--<a class="btn btn-sm" @click="delImg(index)">删除图片</a>-->
                <!--</div>-->
                    <!--<input type="hidden" name="imgUrl" id="imgUrl">-->
                    <!--<a class="btn btn-sm" id="upload2">修改图片</a>-->
                <div v-if="!isBlank(goodsCategory.imgId)">
                    <!--<img v-bind:src="window.parent.vm.ossHost+goodsImageEntity.imageUrl" >-->
                    <img v-bind:src="window.parent.vm.ossHost+image.imageUrl" >
                    <a @click="delImg(image.id)">删除</a>
                </div>
            </div>
            <div class="col-md-3 control-label" >
                <a class="btn btn-info btn-sm" id="upload1">
                    <span v-if="isBlank(goodsCategory.imgId)">上传图片</span>
                    <span v-else>修改图片</span>
                </a>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label"></div>
            <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="保存"/>
            &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
        </div>
    </form>
</div>
<!--修改end-->
</div>
<!-- 选择部门 -->
<div id="goodsCategoryLayer" style="display: none;padding:10px;">
    <ul id="goodsCategoryTree" class="ztree"></ul>
</div>
<script src="${request.contextPath}/statics/js/modules/goodsCategory/goodscategory.js?_${.now?long}"></script>
<script>

</script>
</body>
</html>